var WxParse = require('../../../wxParse/wxParse.js');
var app = getApp()
var id;
Page({
  data:{
    current: 0,
    comtent:[{
      avatar:"images/hearder.jpg",
         user_nicename:"张三",
         content:"用户评论的语言，蛋糕还是很好的很新鲜，下次还会回购的蛋糕还是很好的很新鲜呢。",
         datetime:"2017-09-10",
         images: [{ "url":"images/cakes.jpg"}, { "url":"images/cakes.jpg"} ],
         ishaveChlid: true,
         huifu: [{
            word:"谢谢回顾",
            time:"2017-12-19"
         }]
    }],

  },

 
  onLoad: function (options) {
    // 页面初始化 options为页面跳转所带来的参数
    var that = this;
    var ids = options.ids;
    wx.request({
      url: 'https://www.cakeyouxuan.com/small/comment/comment_all',
      data: {
        goodsid: ids,
      },
      method: "POST",
      header: {
        "Content-Type": "application/x-www-form-urlencoded"  //post
      },
      success: function (res) {
        console.log(res);
        that.setData({
          comtent:res.data.comment,
        });
        // article = res.data.information;
        // console.log(143838)
        // console.log(article)
      }
    })

  },

  onShow:function(){
    
  },
  onHide:function(){
    // 页面隐藏
  },
  onUnload:function(){
    // 页面关闭
  }

})
